//
//  HBAlertAction.m
//  HBActionSheet
//
//  Created by 韩冰 on 2017/10/24.
//  Copyright © 2017年 韩冰. All rights reserved.
//

#import "HBAlertAction.h"
#import "HBAlertView.h"
@implementation HBAlertAction

+ (HBAlertView *)HB_CreateArertWith:(NSString *)title withDetail:(NSString *)detail withItem:(NSArray *)items handler:(void (^)(NSInteger index))handerAction{
    HBAlertView *alert = [[HBAlertView alloc]initWithTitle:title detail:detail items:items handler:^(NSInteger index) {
        handerAction(index); 
    }];
    [alert show];
    return alert;
}
+ (HBAlertView *)HB_CreateArertDetail:(NSString *)detail withItem:(NSArray *)items handler:(void (^)(NSInteger index))handerAction{
    HBAlertView *alert = [[HBAlertView alloc]initWithTitle:nil detail:detail items:items handler:^(NSInteger index) {
        handerAction(index);
    }];
    [alert show];
    return alert;
}
@end
